package com.yi.wood.service.impl;

import com.yi.wood.dao.TerritoryDao;
import com.yi.wood.entity.Territory;
import com.yi.wood.service.TerritoryService;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

/**
 * @author moyi
 */

public abstract class AbstractTerritoryServiceImpl implements TerritoryService {

    @Resource
    private TerritoryDao territoryDao;

    @Override
    public boolean addTerritory(Territory territory, Double lat, Double lon) {
        territoryDao.addTerritory(territory.getName(), new Date(), territory.getUserId(), lat, lon);
        return false;
    }

    @Override
    public Territory addData(Territory territory) {
        return null;
    }

    @Override
    public Territory updateData(Territory territory) {
        return null;
    }

    @Override
    public void delData(Long id) {

    }

    @Override
    public Page<Territory> pageDataList(Example<Territory> example, Pageable pageable) {
        return null;
    }
}
